﻿CREATE TABLE [Membership].[UserClaims] (
    [Id]         INT            IDENTITY (1, 1) NOT NULL,
    [UserId]     UNIQUEIDENTIFIER NOT NULL,
    [ClaimType]  NVARCHAR (MAX) NULL,
    [ClaimValue] NVARCHAR (MAX) NULL,
    CONSTRAINT [PK_Membership.Claims] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Membership.UserClaims_Membership.Users_UserId] FOREIGN KEY ([UserId]) REFERENCES [Membership].[Users] ([Id]) ON DELETE CASCADE
);


GO
CREATE NONCLUSTERED INDEX [IX_UserId]
    ON [Membership].[UserClaims]([UserId] ASC);

